<template>
	<view class="topBar">
		<!-- 自定义导航栏 -->
		<view>
			<uni-nav-bar color="black" backgroundColor="#3284fc" @clickLeft="back" height="50px" :border="false"
				left-icon="left" leftText="返回" rightText="设置" title="确认订单" />
		</view>


		<view class="contentBtn">
			<uni-card style="border-radius: 30rpx; margin-bottom: 300rpx;">
				<!-- 地图 -->
				<map id="map" :longitude="longitude" :latitude="latitude" scale="14" :markers="covers" show-location
					style="width: 100%; height: 70vh;"></map>

				<!--打车路线  -->
				<view class="info">
					<view class="location-details">
						<text class="location-name">车百事汽车生活馆</text>
						<text class="location-address">山东区人民东路与新城路交叉口</text>
					</view>
					<button class="navigate-button">导航</button>
				</view>
			</uni-card>
		</view>


	</view>
</template>

<script>
	export default {
		data() {
			return {
				latitude: 34.813526,
				longitude: 113.560539,
				covers: [{
					latitude: 34.813526,
					longitude: 113.560539,
					iconPath: '/static/myf_img/定位2.png'
				}, {
					latitude: 34.8333,
					longitude: 113.557892,
					iconPath: '/static/myf_img/定位2.png'
				}]
			}
		},
		methods: {
			back() {
				uni.switchTab({
					url: "/pages/index/index"
				})
			},
		},
	}
</script>

<style>
	.container {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.info {
		width: 100%;
		padding: 10px;
		background-color: #fff;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		border-top: 1px solid #e0e0e0;
	}

	.location-details {
		display: flex;
		flex-direction: column;
	}

	.location-name {
		font-size: 18px;
		font-weight: bold;
	}

	.location-address {
		font-size: 14px;
		color: #666;
		margin-top: 20rpx;
	}

	.navigate-button {
		width: 80px;
		height: 30px;
		background-color: #007aff;
		color: #fff;
		text-align: center;
		line-height: 30px;
		border-radius: 30px;
	}

	.topBar {
		background-color: #3284fc;
		width: 750rpx;
		height: 400rpx;
	}
</style>